import React, { forwardRef } from 'react';
//子组件
const ChildComponent = forwardRef((props, ref) => {
    return <div>
        <input type="text" ref={ref} />
    </div>
})
export default ChildComponent;